﻿
@if (Request.IsAuthenticated)
{
    using (Html.BeginForm("LogOut", "Member", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
    {
    @Html.AntiForgeryToken()

    <ul class="nav navbar-nav navbar-right">
        <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Welcome @User.Identity.Name<span class="glyphicon glyphicon-user pull-right"></span></a>
            <ul class="dropdown-menu">
                <li><a href="/CreateApp">Create Application</a></li>
                <li><a href="/MyApps">My Apps</a></li>
                <li class="divider"></li>
                @*<li><a href="#">الملف الشخصي <span class="glyphicon glyphicon-stats pull-right"></span></a></li>*@
                <li><a href="/ChangePassword">Change Password</a></li>
            </ul>
        </li>
            
        <li><a href="javascript:document.getElementById('logoutForm').submit()">Logout</a></li>
    </ul>
    }
}
else
{
    <ul class="nav navbar-nav navbar-right">
        <li>@Html.ActionLink("Signup", "Signup", "Member", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
        <li>@Html.ActionLink("Login", "Login", "Member", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}
